<?php

use Biz\service\activity\Coupon as sCoupon;
use Biz\service\trade\UserAddress as sUserAddress;
/**
 * @deprecated
 */
class RecommendListAction extends ActionPlugin
{
	public function main()
	{
		$tab = $this->getRequest()->getQuery('tab', 1);
		$skuIds = $this->getRequest()->getQuery('sku_ids', '');
		$skuIds = explode(',', $skuIds);
		$skuIds = array_filter($skuIds);
		$provinceId = $this->getRequest()->getQuery('province_id', 0);
		$cityId = $this->getRequest()->getQuery('city_id', 0);
		$defaultCityId = sUserAddress::getUserDefaultCityCode($this->uid);
		$areaCode = $defaultCityId ? $defaultCityId : ($cityId ? $cityId : $provinceId);

		$recommendList = sCoupon::recommendList($this->uid, $tab, $skuIds, $areaCode, $this->appType);

		$this->setSuccess(['list' => $recommendList]);
	}
}